/**
 * Highlights a given node
 * NOTE: this doesnt work, while it gets the cache, it doesnt seem to be able to access this
 *		but if this can be made to work, it has a way better design than the other highlight function
 *		andwe wont need to set fake ids to everything, which would be a huge improvement
 * @param i
 *		i is the index of the node in the cache
 * @param cache
 * 		 cache
 *
function highlight(i,cache){
	var node = cache.links[i].node;
	node.style.backgroundColor='#FFFF66';
}*/

/**
 * Highlights a given node
 * @param id
 *		id of the element to be highlighted
 */
function highlight(id){
	var node = document.getElementById(id);
	node.style.backgroundColor='#FFFF66';
}

/**
 * removes the highlight on a given node
 * @param id
 *		id of the element
 */
function removeHighlight(id){
	var node = document.getElementById(id);
	node.style.backgroundColor='transparent';
}

/**
 * Displays a message in popupdiv
 * 
 * @param event
 *		event associated with the mouseover
 * @param i
 *		index of the node in the cache
 */
function displaymessage(event, str){
	var x = event.pageX+10;
	var y = event.pageY+10;
	var e = document.getElementById('popupdiv');
	e.style.display='block';
	e.style.left=x+'px';
	e.style.top=y+'px';
	e.innerHTML=str;
} 

/**
 * hides message created by displaymessage
 * 
 */
function hidemessage() {
document.getElementById('popupdiv').style.display='none';
}
